Skip to content

Fix module name in markdown extensions block - #37

Closed
jmaupetit wants to merge 1 commit into
mkdocs:masterfrom
jmaupetit:patch-1
Closed

jmaupetit wants to merge 1 commit into
mkdocs:masterfrom
jmaupetit:patch-1

Conversation

@jmaupetit

Copy link
Copy Markdown

Markdown extensions block should list python module names and not package names.

Thank you for this amazing project 💪

Markdown extensions block should list python module names and not package names.
@florimondmanca

Copy link
Copy Markdown
Contributor

@jmaupetit Thanks! Just to clarify, does using mkdocs-click fail, or is it simply not a recommended practice from Python Markdown? Indeed I can see that builtin Markdown extensions use the module_name as the entrypoint: https://python-markdown.github.io/extensions/, just didn't know it was a convention. :)

@jmaupetit

Copy link
Copy Markdown
Author

It fails at it tries to load the mkdocs-click python module.

@florimondmanca

florimondmanca commented Feb 25, 2021 •

Copy link
Copy Markdown
Contributor

Interesting, I'm not seeing this in https://github.com/DataDog/integrations-core (we use mkdocs-click there).

I think it works thanks to our Markdown extension entry point definition here:

https://github.com/DataDog/mkdocs-click/blob/a01754d73dbfebdd40907dc4a731f4f1f76e95f0/setup.py#L38

Which seems to be designed to make markdown.Markdown(extensions=["mkdocs-click"]) (using a string) work as expected. I can verify this because if I change this entry_points definition to point to eg mkdocs-click2 = ..., then mkdocs-click isn't recognized anymore by MkDocs. :-)

Are your setuptools, mkdocs-click, mkdocs and markdown versions up to date? Which Python version are you on?

@jmaupetit

Copy link
Copy Markdown
Author

Are your setuptools, mkdocs-click, mkdocs and markdown versions up to date?

Yes, I think so: https://github.com/openfun/ralph/blob/master/setup.cfg#L54-L55

Which Python version are you on?

Python 3.9 https://github.com/openfun/ralph/blob/master/Dockerfile#L2

@oprypin

This comment was marked as abuse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants